package cn.mw.cmdb.service;

import cn.mw.cmdb.entity.cloudWisdom.CloudWisdomModelPageVo;
import cn.mw.cmdb.entity.cloudWisdom.CloudWisdomModelPropertyVo;
import cn.mw.cmdb.entity.cloudWisdom.CloudWisdomReportResultVo;
import cn.mw.cmdb.entity.cloudWisdom.CloudWisdomReportRuleInfo;
import cn.mw.components.mongodb.entity.SearchParam;

import java.util.List;
import java.util.Map;

public interface CloudWisdomReportService {

    /**
     * 新增或删除上报规则
     * @param cloudWisdomReportRuleInfo
     * @return
     * @throws Exception
     */
    Boolean addOrUpdateCloudWisdomReportRule(CloudWisdomReportRuleInfo cloudWisdomReportRuleInfo) throws Exception;

    /**
     * 批量删除上报规则
     * @param ids
     * @return
     * @throws Exception
     */
    boolean batchDeleteCloudWisdomReportRules(List<String> ids) throws Exception;

    /**
     * 分页查询上报规则
     * @param param
     * @return
     * @throws Exception
     */
    Object getCloudWisdomReportRuleByPage(SearchParam param) throws Exception;

    /**
     * 分页查询云智慧模型列表
     * @param param
     * @return
     * @throws Exception
     */
    CloudWisdomModelPageVo getCloudWisdomModelInfoByPage(Integer channelId, SearchParam param) throws Exception;


    /**
     * 根据模型ID查询模型属性列表
     *
     * @param modelId
     * @return
     */
    List<CloudWisdomModelPropertyVo> getModelPropertiesListByModelId(Integer channelId, String modelId);

    CloudWisdomReportResultVo doReport(List<String> ruleIds) throws Exception;

    Object getCloudWisdomReportHistoryInfoByPage(SearchParam param) throws Exception;

    Object getCloudWisdomInstanceReportDetailByPage(SearchParam param) throws Exception;

    Map<String, Integer> getCloudWisdomReportHistoryStatusCount(SearchParam param) throws Exception;

    boolean batchDeleteCloudWisdomReportHistory(List<String> ids) throws Exception;
}
